<?php
/**
 * 管理员
 * Created by Vscode.
 * User: Luanzg
 * Date: 2020/05/22 1526
 * Time: 15:26
 */
namespace app\common\validate;

class Material extends BaseValidate
{
    protected $field = [
        'mat_name'    => '素材名称',
        'mat_id'      => '素材ID'

    ];

    protected $rule = [
        'mat_name'     => 'require'
    ];

    /**
     * 编辑
     */
    protected function sceneeditsave()
    {
        return $this->only([
            'mat_id',
            'mat_name'
        ]);
    }
    
    /**
     * 新增
     */
    protected function scenecopysave()
    {
        return $this->only([
            'mat_name'
        ]);
    }

}
